package main.iterator;

public class Menu2 {

    private static final int MAX_ITEMS = 3;
    private MenuItem[] menuItems;

    public Menu2() {
	this.menuItems = new MenuItem[MAX_ITEMS];
	menuItems[0] = new MenuItem(1L, "1");
	menuItems[1] = new MenuItem(2L, "2");
	menuItems[2] = new MenuItem(3L, "3");
    }

    public void setMenuItems(MenuItem[] menuItems) {
	this.menuItems = menuItems;
    }

    public MyIterator getIterator() {
	return new MyIterator2(this.menuItems);
    }
}
